#!/usr/bin/env ruby
require "hpricot" 
require "open-uri"
require 'cgi'
require 'iconv'
require 'htmlentities'
require 'json'
require 'net/http'

require 'geonames'
require 'iconv'

require 'flickraw'

#key = "e496cb4c3a379b2de0aae18f5528eb22"
#secret = "0aef1c50d532f48c"
#
#class Flickr
#  def initialize(key, secret)
#    @key = key
#    @secret = secret
#  end
#  
#  def geo_search(lat, lon)
#    nil
#  end
#  
#  def tag_search(tag)
#    nil
#  end
#end
#
#f = Flickr.new(key, secret)

i = 16
begin
  
  call = flickr.places.findByLatLon :lat => 59.9186, :lon => 10.8038, :accuracy => i
  location_name = call[0].name
  p call
  i -= 1
end while i != 1